#!/usr/bin/env python

from distutils.core import setup
from commands import getstatusoutput

s, svn_revision = getstatusoutput("svn info | grep 'Revision' | cut -f 2 -d ' '")
s, svn_branch = getstatusoutput("if svn info | grep '^URL' | grep -q 'Appliansys/branches' ; then echo 'a' ; fi")

setup(name='worthyd',
      version='0.0.%s%s' % (svn_revision, svn_branch),
      description='Worthyd Cluster Daemon',
      long_description=
"""Worthyd is a daemon which when run on multiple machines (on the same subnet) 
allows automatic failover of group leadership and reporting of group
membership.
It is a possible component of self-balacing failover clusters, where the
load-balancing function is taken on by one of the real servers.""",
      author='Chris Dew',
      author_email='chris.dew@appliansys.com',
      url='http://www.appliansys.com/opensource/worthyd',
      scripts=['sbin/worthyd'],
      data_files=[('etc/worthyd', ['worthyd.conf'])],
      include_package_data=True,
      packages=['worthyd'],
      )

